package com.course.server.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;

/**
 * @author: Durian
 * @date: 2021/4/18 18:36
 */
@Data
@Validated
public class ChapterDto {

    private String id;

    @NotBlank(message = "名称不能为空")
    private String name;

    @NotBlank(message = "课程ID不能为空")
    @Length(min = 1, max = 8, message = "课程ID在1~8位")
    private String courseId;

}
